package com.study.mike.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.study.mike.model.dto.PageDTO;
import com.study.mike.model.dto.QuerySaleOrderProductDTO;
import com.study.mike.model.dto.SaleOrderDTO;
import com.study.mike.model.entity.SaleOrder;
import com.study.mike.model.po.*;

/**
 * @author KangHui
 * @Date 2022/8/29 17:14
 */
public interface OrderService extends IService<SaleOrder> {

    /**
     * 创建订单
     *
     * @param addOrderPO
     * @return
     */
    SaleOrderDTO createOrder(AddOrderPO addOrderPO);


    /**
     * 查询订单列表
     *
     * @param querySaleOrderPO
     * @return
     */
    PageDTO<SaleOrderDTO> querySaleOrder(QuerySaleOrderPO querySaleOrderPO);

    /**
     * 编辑订单信息
     *
     * @param po
     * @return
     */
    Boolean editOrder(EditOrderPO po);

    /**
     * 通过id/订单号移除订单信息
     *
     * @param po
     * @return
     */
    Boolean deleteOrder(DeleteOrderPO po);

    /**
     * 订单确认
     *
     * @param po
     * @return
     */
    Boolean confirmOrder(ConfirmOrderPO po);

    /**
     * 订单详情
     *
     * @param productInfoPO
     * @return
     */
    QuerySaleOrderProductDTO queryOrderInfo(SaleOrderProductInfoPO productInfoPO);

    /**
     * 订单审核
     *
     * @param po
     * @return
     */
    Boolean examine(ConfirmOrderPO po);

    /**
     * 完成订单
     *
     * @param po
     * @return
     */
    Boolean complete(ConfirmOrderPO po);

}
